import request from './request'

// 添加销售记录的接口 /sale/add post 参数： saleList
export const reqInsertSaleList = (data) => {
  return request({
    url: '/sale/add',
    method: 'POST',
    data
  })
}
// 获取年份 /sale/year get 参数：无
export const reqGetYear = () => {
  return request({
    url: '/sale/year'
  })
}
// 获取月份 /sale/month get 参数：data:年份
export const reqGetMonth = (data) => {
  return request({
    url: `/sale/month?year=${data}`
  })
}
// 获取销售信息 /sale/message post 参数：data:搜索信息
export const reqGetSaleMessage = (data) => {
  return request({
    url: '/sale/message',
    method: 'POST',
    data
  })
}
